<tagLib name="html" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新增商品</title>
	<include file="Public:header" />
	<style type="text/css">
		.input{width:190px; border:1px solid #ccc; padding:2px;}
		.select{width:190px; border:1px solid #ccc; height:25px; padding:2px;}
	</style>
	<script type="text/javascript">
		function chkfrm()
		{
			if($('#title').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入名称',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#classid').val()=='')
			{
				$.messager.show({title:'提示',msg:'请请选择一个类别',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#orderid').val()=='')
			{
				$.messager.show({title:'提示',msg:'请正确输入排序号，只能为数字',timeout:5000,showType:'slide'});
				return false;
			}
			return true;
		}
	</script>
</head>
<body class="">
	<div class="demo-info space-out-10px">
		<div class="demo-tip icon-tip"></div>
		<div>商品是公司营运的主体内容，这里可以维护商品信息</div>
	</div>
	<form id="form1" method="post" action="{:U('Stk/data_add_save')}" onsubmit="return chkfrm()">
	
	<ul class="idTabs space-out-10px"> 
		<li><a href="#tabs_basic">基本信息</a></li>
		<li><a href="#tabs_description">简述</a></li>
		<li><a href="#tabs_content">详细</a></li>
		<li><a href="#tabs_extattr">扩展属性</a></li>
	</ul>
	<div id="tabs_basic">
		<table class="space-out-10px">
		<tr>
		<td style="width:100px;">商品名称：</td><td><input type="text" id="title" name="title" class="easyui-validatebox input" required="true" /></td>
		</tr>
		<tr>
		<td style="width:100px;">商品编号或条码：</td><td><input type="text" id="stk_c" name="stk_c" class="input" /></td>
		</tr>
		
        <tr>
		<td style="width:100px;">单位：</td><td><input type="text" id="uom" name="uom" class="input" /></td>
		</tr>
		
		<tr>
		<td style="width:100px;">采购单价(参考)：</td><td><input type="text" id="price_pur" name="price_pur" class="input" /></td>
		</tr>
		<tr>
		<td style="width:100px;">销售单价(参考)：</td><td><input type="text" id="price_sales" name="price_sales" class="input" /></td>
		</tr>
		
		<tr>
		<td>品牌：</td><td><select id="brandid" name="brandid" class="easyui-combobox" editable="false" style="width:190px;">
								<option value='0'>没有品牌</option>
								<volist name='brandlist' id="brandlist">
								<option value='{$brandlist["id"]}'><for start="2" end="$brandlist['count']">|----</for>{$brandlist['classname']}</option>
								</volist>
								</select>
								</td>		
		</tr>
		<tr>
		<td>所属类别：</td><td><select id="classid" name="classid" class="easyui-combobox" editable="false" style="width:190px;">
								<option value='0'>没有类别</option>
								<volist name='classlist' id="classlist">
								<option value='{$classlist["id"]}'><for start="2" end="$classlist['count']">|----</for>{$classlist['classname']}</option>
								</volist>
								</select>
								<script type="text/javascript">$("#classid").attr("value","{$classid}");</script>
								</td>		
		</tr>
		<tr>
		<td style="width:100px;">KEY关键字：</td><td><input type="text" id="keywords" name="keywords" class="input" /></td>
		</tr>
		
		<tr>
		<td>图片(150x150)：</td><td><input type="text" id="picurl" name="picurl" class="input" />
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-up" onclick="open_upload_window('picurl')">新上传</a>
		</td>
		</tr>
		<tr>
		<td style="width:100px;">最小库存量：</td><td><input type="text" id="qty_min" name="qty_min" class="input" /></td>
		</tr>
		<tr>
		<td style="width:100px;">最大库存量：</td><td><input type="text" id="qty_max" name="qty_max" class="input" /></td>
		</tr>
		<tr>
		<td style="width:100px;">是否管控：</td><td>
		<input type="checkbox" id="flag1" name="flag1" value="Y"  />非管控(进出时不影响库存) 
		</td>
		</tr>
		<tr style="display:none;">
		<td style="width:100px;">相关标志：</td><td>
		<input type="checkbox" id="flag2" name="flag2" value="Y"  />FLG2 
		<input type="checkbox" id="flag3" name="flag3" value="Y"  />FLG3 
		<input type="checkbox" id="flag4" name="flag4" value="Y"  />FLG4 
		<input type="checkbox" id="flag5" name="flag5" value="Y"  />FLG5 </td>
		</tr>
		
		
        
        <tr>
		<td>规格：</td><td><input type="text" id="spec" name="spec" class="input" value="" /></td>
		</tr>
        
        <tr>
		<td>产地：</td><td><input type="text" id="madein" name="madein" class="input" value="" /></td>
		</tr>
        
        <tr>
		<td>排序号：</td><td><input type="text" id="orderid" name="orderid" value="{$orderid}" class="easyui-validatebox input" required="true" /></td>
		</tr>
		<tr>
		<td>发布时间：</td><td><input type="text" id="posttime" name="posttime" class="easyui-datetimebox input"  editable="false" value="{$posttime}" style="width:190px" /></td>
		</tr>
		<tr>
		<td>状态：</td><td><input type="radio" name="status_flg" value="Y" checked />正常  <input type="radio" name="status_flg" value="N" />禁用</td>
		</tr>
        
		</table>	

		
	</div>
	<div id="tabs_description">		
		<table class="space-out-10px" style="width:98%;">
		<tr>
		<td>&nbsp;</td>
		</tr>
		<tr>
		<td><textarea name="description" id="description" class="input" style="width:98%;height:300px;"></textarea></td>
		</tr>
		</table>
	</div>
	<div id="tabs_content">
		<table class="space-out-10px">
		<tr>
		<td>&nbsp;</td>
		</tr>
		<tr>
		<td><!--textarea name="content" id="content" class="input"></textarea-->
		<html:editor type="ckeditor" id="content" width="99%" height="250px" name="content"></html:editor>
		</td>
		</tr>
		</table>
	</div>
	<div id="tabs_extattr">
		<table class="space-out-10px">		
		<tr>
		<td>颜色：</td><td><input type="text" id="diyinfo[color]" name="diyinfo[color]"  class="input" /></td>
		</tr>
		<tr>
		<td>材质：</td><td><input type="text" id="diyinfo[material]" name="diyinfo[material]"  class="input" /></td>
		</tr>
		<tr>
		<td>重量：</td><td><input type="text" id="diyinfo[weight]" name="diyinfo[weight]"  class="input" /></td>
		</tr>
		<tr>
		<td>体积：</td><td><input type="text" id="diyinfo[size]" name="diyinfo[size]"  class="input" /></td>
		</tr>
		</table>
	</div>
	
		<table class="space-out-10px">
		<tr>
		<td>&nbsp;</td><td>&nbsp;</td>
		</tr>
		<tr>
		<td>&nbsp;</td><td>
		<input type="hidden" id="flag" name="flag" value="" />
		<input type="hidden" id="hits" name="hits" value="0" />
		<input type="hidden" id="picarr" name="picarr" value="" />
		<input type="hidden" id="parentid" name="parentid" value="0" />
		<input type="hidden" id="parentstr" name="parentstr" value=",0," />
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-save" onclick="$('#form1').submit();">保存</a>
		<a href="{:U('Stk/data_list')}" class="easyui-linkbutton" iconCls="icon-undo">取消</a>
		</td>
		</tr>
		</table>
		

	</form>
	<include file="Public:upload" />

</body>
</html>
